<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>股票分析系统</title>
    <!-- 引入Vue 3 生产版本 -->
    <script src="https://unpkg.com/vue@3.3.8/dist/vue.global.prod.js"></script>
    <!-- 引入Element Plus样式 -->
    <link rel="stylesheet" href="https://unpkg.com/element-plus@2.3.14/dist/index.css">
    <!-- 引入Element Plus -->
    <script src="https://unpkg.com/element-plus@2.3.14/dist/index.full.min.js"></script>
    <!-- 引入Element Plus 图标 -->
    <script src="https://unpkg.com/@element-plus/icons-vue@2.1.0/dist/index.iife.min.js"></script>
    <!-- 引入Axios -->
    <script src="https://unpkg.com/axios@1.6.0/dist/axios.min.js"></script>
    
    <!-- 引入模块化CSS -->
    <link rel="stylesheet" href="css/board-rotation.css">
    <link rel="stylesheet" href="css/qingxu.css">
    <link rel="stylesheet" href="css/zhangting.css">
    
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        #app {
            height: 100vh;
            display: flex;
            flex-direction: column;
        }

        .header {
            height: 60px;
            background-color: #409EFF;
            color: white;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 20px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        .logo {
            font-size: 24px;
            font-weight: bold;
        }

        .user-info {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .main-content {
            flex: 1;
            display: flex;
            background-color: #f5f7fa;
        }

        .sidebar {
            width: 200px;
            background-color: #2c3e50;
            color: white;
            padding: 20px 0;
        }

        .nav-menu {
            list-style: none;
            padding: 0;
            margin: 0;
        }

        .nav-item {
            margin-bottom: 5px;
        }

        .nav-link {
            display: block;
            padding: 12px 20px;
            color: white;
            text-decoration: none;
            transition: all 0.3s ease;
            cursor: pointer;
        }

        .nav-link:hover {
            background-color: #34495e;
        }

        .nav-link.active {
            background-color: #409EFF;
            border-left: 4px solid #2196F3;
        }

        .nav-link i {
            margin-right: 10px;
        }

        .content-wrapper {
            flex: 1;
            display: flex;
            flex-direction: column;
        }

        .content-area {
            flex: 1;
            padding: 20px;
            overflow-y: auto;
        }

        .page-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding: 20px;
            background: white;
            border-radius: 8px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        }

        .page-header h2 {
            color: #2c3e50;
            margin: 0;
        }

        .header-actions {
            display: flex;
            gap: 10px;
        }

        .statistics-panel {
            margin-top: 20px;
            padding: 20px;
            background: white;
            border-radius: 8px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        }

        .statistics-panel h3 {
            color: #2c3e50;
            margin-bottom: 15px;
        }

        .stat-card {
            text-align: center;
        }

        .stat-title {
            color: #606266;
            font-size: 14px;
            margin-bottom: 8px;
        }

        .stat-value {
            color: #2c3e50;
            font-size: 24px;
            font-weight: bold;
        }

        .board-rotation-page {
            animation: fadeIn 0.5s ease-in-out;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* 首页卡片样式 */
        .dashboard-page {
            animation: fadeIn 0.5s ease-in-out;
        }

        .dashboard-cards {
            margin-top: 30px;
        }

        .dashboard-card {
            text-align: center;
            padding: 40px 20px;
            cursor: pointer;
            transition: all 0.3s ease;
            border: 2px solid transparent;
        }

        .dashboard-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
            border-color: #409EFF;
        }

        .card-icon {
            margin-bottom: 20px;
        }

        .dashboard-card h3 {
            color: #2c3e50;
            margin: 15px 0 10px;
            font-size: 20px;
            font-weight: 600;
        }

        .dashboard-card p {
            color: #606266;
            font-size: 14px;
            margin: 0;
            line-height: 1.5;
        }
    </style>
</head>
<body>
    <div id="app">
        <!-- 头部 -->
        <div class="header">
            <div class="logo">股票分析系统</div>
            <div class="user-info">
                <span>{{ currentUser }}</span>
                <el-button type="text" style="color: white;">退出</el-button>
            </div>
        </div>

        <!-- 主要内容区域 -->
        <div class="main-content">
            <!-- 侧边导航栏 -->
            <div class="sidebar">
                <ul class="nav-menu">
                    <li class="nav-item">
                        <a class="nav-link" :class="{ active: currentPage === 'dashboard' }" @click="switchPage('dashboard')">
                            <i class="el-icon-s-home"></i>
                            首页
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" :class="{ active: currentPage === 'board-rotation' }" @click="switchPage('board-rotation')">
                            <i class="el-icon-s-grid"></i>
                            板块轮动
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" :class="{ active: currentPage === 'qingxu' }" @click="switchPage('qingxu')">
                            <i class="el-icon-s-data"></i>
                            情绪指数
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" :class="{ active: currentPage === 'zhangting' }" @click="switchPage('zhangting')">
                            <i class="el-icon-s-marketing"></i>
                            涨停股
                        </a>
                    </li>
                </ul>
            </div>

            <!-- 内容区域 -->
            <div class="content-wrapper">
                <div class="content-area">
                    <!-- 首页 -->
                    <div v-if="currentPage === 'dashboard'" class="dashboard-page">
                        <div class="page-header">
                            <h2>股票分析系统</h2>
                        </div>
                        <div class="dashboard-cards">
                            <el-row :gutter="20">
                                <el-col :span="8">
                                    <el-card class="dashboard-card" @click="switchPage('board-rotation')">
                                        <div class="card-icon" style="color: #409EFF;">
                                            <i class="el-icon-s-grid" style="font-size: 48px;"></i>
                                        </div>
                                        <h3>板块轮动</h3>
                                        <p>分析板块热点轮动趋势</p>
                                    </el-card>
                                </el-col>
                                <el-col :span="8">
                                    <el-card class="dashboard-card" @click="switchPage('qingxu')">
                                        <div class="card-icon" style="color: #67C23A;">
                                            <i class="el-icon-s-data" style="font-size: 48px;"></i>
                                        </div>
                                        <h3>情绪指数</h3>
                                        <p>市场情绪与投资热度分析</p>
                                    </el-card>
                                </el-col>
                                <el-col :span="8">
                                    <el-card class="dashboard-card" @click="switchPage('zhangting')">
                                        <div class="card-icon" style="color: #E6A23C;">
                                            <i class="el-icon-s-marketing" style="font-size: 48px;"></i>
                                        </div>
                                        <h3>涨停股</h3>
                                        <p>每日涨停股票统计分析</p>
                                    </el-card>
                                </el-col>
                            </el-row>
                        </div>
                    </div>

                    <!-- 板块轮动页面 -->
                    <board-rotation-component v-else-if="currentPage === 'board-rotation'"></board-rotation-component>
                    
                    <!-- 情绪指数页面 -->
                    <qingxu-component v-else-if="currentPage === 'qingxu'"></qingxu-component>
                    
                    <!-- 涨停股页面 -->
                    <zhangting-component v-else-if="currentPage === 'zhangting'"></zhangting-component>
                </div>
            </div>
        </div>
    </div>

    <!-- 引入模块化JavaScript -->
    <script src="js/board-rotation.js"></script>
    <script src="js/qingxu.js"></script>
    <script src="js/zhangting.js"></script>
    <script src="components/board-rotation-component.js"></script>
    <script src="components/qingxu-component.js"></script>
    <script src="components/zhangting-component.js"></script>

    <script>
        const { createApp } = Vue;
        
        // 创建Vue应用
        const app = createApp({
            data() {
                return {
                    currentUser: '管理员',
                    currentPage: 'dashboard' // 默认显示首页
                }
            },
            
            methods: {
                // 切换页面
                switchPage(page) {
                    this.currentPage = page;
                }
            },
            
            mounted() {
                console.log('股票分析系统启动');
            }
        });

        // 注册组件
        app.component('board-rotation-component', BoardRotationComponent);
        app.component('qingxu-component', QingxuComponent);
        app.component('zhangting-component', ZhangtingComponent);
        
        // 使用Element Plus
        app.use(ElementPlus);
        
        // 全局配置
        app.config.globalProperties.$ELEMENT = { size: 'default', zIndex: 3000 };
        
        // 挂载应用
        app.mount('#app');
    </script>
</body>
</html>